import { ElButton } from 'element-plus'
import { defineComponent, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import styles from './style/index.module.scss'
import SearchBar from './components/SearchBar.vue'
export default defineComponent({
  name: 'home',
  setup() {
    const { t } = useI18n()
    const searchData = ref({
      keyword: '',
      placeholder: '请输入你要查询的关键字',
      options: [
        {
          label: '视频',
          value: 'video',
        },
        {
          label: '文章',
          value: 'article',
        },
        {
          label: '用户',
          value: 'user',
        },
      ],
      selectedValue: 'video',
    })
    return () => (
      <>
        <ElButton type="primary">{t('button.upload')}</ElButton>
        <div class={styles.test}></div>
        <test-register />

        <SearchBar v-model={searchData.value} />


        {/* <vModel v-model="searchText.name" />
        <vModel :modelValue="searchText.name" @update:modelValue="(newValue) => (searchText.name = newValue)" /> */}

      </>
    )
  },
})
